(Fsingle_key_description): For an invalid char, retuen
authorKenichi Handa <handa@m17n.org>
Tue, 26 Sep 2006 04:16:59 +0000 (04:16 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 26 Sep 2006 04:16:59 +0000 (04:16 +0000)
"Invalid char code NNNNN".

src/keymap.c

index 2c6c5ef03c94788007c1dfa63424dc2dabb9aa35..9b36ec08b6d7b0d656d193c678710193c02257de 100644 (file)
@@ -2385,9 +2385,15 @@ around function keys and event symbols.  */)
       else
        SPLIT_CHAR (without_bits, charset, c1, c2);
 
-      if (charset
-         && CHAR_VALID_P (charset, 1)
-         && ((c1 == 0 && c2 == -1) || c2 == 0))
+      if (! CHAR_VALID_P (without_bits, 1))
+       {
+         char buf[256];
+
+         sprintf (buf, "Invalid char code %d", XINT (key));
+         return build_string (buf);
+       }
+      else if (charset
+              && ((c1 == 0 && c2 == -1) || c2 == 0))
        {
          /* Handle a generic character.  */
          Lisp_Object name;